<template>
	<view class="share">
		<view :class="{'share-box': shareState}" @click="handleHiddenShare">
		</view>
		<view class="share-item" :class="{'share-show': shareState}">
			<view class="share-to">
				<text>选择地址</text>
			</view>
			<view class="content" v-for="(item, index) in shareList" :key="index">
				<view class="block" >
					<!-- <image :src="item.image" mode="aspectFill"></image> -->
					<view class="content-text">
						<text>{{item.text1}}</text>
						<text>{{item.text2}}</text>
					</view>
					<view class="left-text">
						<text>{{item.content}}</text>
					</view>
					
				</view>
			</view>
			<view class="cancel" @click.stop="handleHiddenShare">
				<text>取消</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {

		},
		name: "service",
		data() {
			return {
				shareList: [{
						
						content: '立即服务',
						text1:'今天(周三)',
						
					},
					{
							
							content: '15:00',
							text1:'今天(周四)',
							
						},
						{
								
								content: '18:00',
								text1:'今天(周五)',
								
							},
				],
				shareState: false,
			};
		},
		methods: {
			// 显示分享
			handleShowShare() {
				this.shareState = true;
			},
			// 隐藏分享
			handleHiddenShare() {
				this.shareState = false;
			}
		}
		}
</script>

<style lang="less" scoped>
	.share {
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
	align-items: center;
		
	}

	.share-box {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0rpx;
		left: 0rpx;
		bottom: 0rpx;
		right: 0rpx;
		background-color: rgba(0, 0, 0, 0.4);
		transition: .3s;
		z-index: 999;
	}

	// 进入分享动画
	.share-show {
		transition: all 0.3s ease;
		transform: translateY(0%) !important;
	}

	// 离开分享动画
	.share-item {
		position: fixed;
		left: 0;
		bottom: 0;
		width: 100%;
		height: auto;
		background-color: #FFFFFF;
		transition: all 0.3s ease;
		transform: translateY(100%);
		z-index: 1999;

		& .share-to {
			width: 100%;
			height: 3rem;
			display: flex;
			justify-content: center;
			align-items: center;

			&::after {
				content: '';
				width: 240rpx;
				height: 0rpx;
				border-top: 1px solid #E4E7ED;
				-webkit-transform: scaleY(0.5);
				transform: scaleY(0.5);
				margin-left: 30rpx;
			}

			&::before {
				content: '';
				width: 240rpx;
				height: 0rpx;
				border-top: 1px solid #E4E7ED;
				-webkit-transform: scaleY(0.5);
				transform: scaleY(0.5);
				margin-right: 30rpx;
			}
		}

		.content {
			margin-top: 10px;
			display: flex;
			flex-direction: column;
			box-shadow: 0 0 10px #e8e8e8;
			width: 94%;
			height: 80px;
			border-radius: 8px;
			margin-left: 10px;
            margin-bottom: 10px;
			& .block {
				// width: 100%;
				display: flex;
				flex-direction: row;
				// justify-content: space-between;
				justify-content: space-between;
				align-items: center;
				height: 180rpx;

				image {
					width: 80rpx;
					height: 80rpx;
				}

				text {
					margin-top: 16rpx;
					font-size: 28rpx;
					color: #606266;
				}
			}
		}

		.cancel {
			width: 100%;
			height: 3rem;
			display: flex;
			justify-content: center;
			align-items: center;
			border-top: 1rpx solid #E4E7ED;
		}
	}
	.content-text{
		width: 80%;
		flex-direction: column;
		display: flex;
		
	}
</style>
